package com.dao.impl;

import java.util.List;

public class ProductCategoryDao extends HibernateDaoSupport implements IProductCategoryDao{

	public ProductCategory get(Integer id){
				return getHibernateTemplate().get(ProductCategory.class, id);
			}
			
			public Integer save(ProductCategory productcategory){
				return (Integer)getHibernateTemplate()
					.save(productcategory);
			}
			
			public void update(ProductCategory productcategory){
				getHibernateTemplate().update(productcategory);
			}
			
			public void delete(ProductCategory productcategory){
				getHibernateTemplate().delete(productcategory);
			}
			
			public void delete(Integer id){
				getHibernateTemplate().delete(get(id));
			}
			
			public List<ProductCategory> findAll(){
				return (List<ProductCategory>)getHibernateTemplate()
						.find("from ProductCategory");
			}



}
